permutation method changed