Changes to implement undoHandler  in the same way as notifyHandler