function setUpgradeAgent(address agent) external {
    require(agent != address(0));
    require(canUpgrade());
    
    require(msg.sender == upgradeMaster);
    
    require(getUpgradeState() != UpgradeState.Upgrading);

    upgradeAgent = UpgradeAgent(agent);

    
    require(upgradeAgent.isUpgradeAgent());
    
    require(upgradeAgent.originalSupply() == totalSupply_);

    emit UpgradeAgentSet(upgradeAgent);
  }