improvements to API