improve api client