Improved test api