Added fake permutation function