took out to_query