pair group clustering method