dd simple step into chain of actions
        newnode.containingGroup = oldlink.containingGroup;
        // Reconnect the existing link to the new node
        oldlink.toNode = newnode;
        // Then add links from the new node to the old node
        if (newnode.category === 'If') {
          diagram.model.addLinkData({ from: newnode.key, to: tonode.key, text: 'yes' });
          diagram.model.addLinkData({ from: newnode.key, to: tonode.key, text: 'no' });
        } else {
          diagram.model.addLinkD