extracted controller logic to a service object