Moved the calculation of the stats module