added permutation test