corrected some function names in permtest functions