added generate statistic