improving the api