two more implementations of permutations in easy 12