refactor data statistics models with inheritance system