basic undo/redo implemented