logic to service