update generation of stats.