improved documentation, fixed a test case