minor improvement on add undo and redo , found some problem in undo and redo,still looking for solution