modified to handle geojson collections