added permutations solution (1.3)