changed check for service type