code for statistic pages