Added class to calculate statistics