Added client logic for the communication with the web service