class to generate stats