add class Document for undo/redo operations