fixing api calls