moved private stuff from webservice to utils