testing many permutations