permutation done