implement Permutations