permutations and variations, recursive implementation added