trying to add delay to API calls