two strategies implementation for undo & redo