correct the calls to the api