new permutation version