refactored controller and service package