update documentation and tests