trying to add a undo redo function