almost done with the permutations