finished implementing the API