refactoring services and controllers