added more tests. added documentation