statistic models and middleware