fixed permutation2