implemented the rest of the api