add utility for generating permutations