working on stats_calc