code refactoring for controller/model