update and fix package
add tests