work half on permutation generation