documentation and more tests