Added more functionality to the API implementation