remove permutation function