PermutTest refactor