added feature permutation function