handling collection in avgMeasurement API