stats functions from R, and a new implementation of utest