debugging api calls