Adding case statement to service