update document; add test coverage