update document history