Changing the code to use Restful API