working on the api