Added new statistics functions and classes