set up webservice and fixed queries