Pulled out geo to query code to it's own func