Change the logic to determine service