service_query is in the wrong place