added queryaverage webservice