updated documentation and tests

fixes #5331