added permutation generator