First try at generating permutations. Will finish later