library of statistics functions