added undo/redo to setData