change api function, add some tests, bump version