removing old stats functions to get rid of numpy dependency