Changed from rotations of a list to stepping through its permutations