update documentation
add tests