added urlencode to encode the api calls. Created an Execute function in the driver to talk to the API. Set up synchronization so each call waits for the previouos to finish.