permutation works