got loop in place to generate permutations