Added a permutation method