permute function

Single permutation