made changes to the web service function