Added code to communicate with web-api