Newbie attempts to generate permutations