Improving the api