refactored statistic model