update code for api