outsourced logic from controller to services