update api call and fix