added buildJSON to webservice