Refactoring for statistic module, now supporting cusom statistic filed