fix doc, add tests
add more tests