changed the undoable function of commandView