Implemented the api calls