updated documentation and tests