refactoring stat controller & service