fix up api call