better geospacial queries, need refactoring