add getting the statistic from database