changes and improves to the api