further enhancements to the document module