updated most of the api calls.