implemented auto update agenda for undo redo