Added generating all permutations