Complete function to find all permutations