added more tests. updated documentation.