added undo redo command pattern
added undo redo command pattern