flip a boolean for unique permutations