change API. update packages. add some tests