modified GeoJSON filter function to work correctly