fix to api call