reformulate the api call