add C library to do permutation test