contract HorseImperial is Governed, ERC20, ERC20Burnable {
    using SafeMath for uint256;
  
    // initialSupply variable initial state
    bool initialSupplyFinished = false;
  
    constructor() ERC20("HorseImperial", "HORI") {
        Governed._initialize(msg.sender);
     }

    /**
     * @dev This implementation is agnostic to the way tokens are created. 
     * This means that a supply mechanism has to be added in a derived contract.
     * 
     *  'initailSupplyfinish' must be 'false' to execute this function,
     *  however after first use, 'true' will be changed to 'false' to lock this function forever.
     * 
     */
    function initialSupply(address contractAddress, uint256 InitialSupply) public onlyGovernor {
        require(initialSupplyFinished == false);
        _totalSupply = _totalSupply.add(InitialSupply);
        _balances[contractAddress] = _balances[contractAddress].add(InitialSupply);
        InitialSupplyFinished = true;
    }

   /**
     * @dev This return state of initialSupply function:
     * 
     * 'false' means that initialSupply is not done yet.
     * 'true' means that it's locked forever.
     * 
     */
    function isInitialSupplyFinished () public view returns (bool) {
        return InitialSupplyFinished;
    }
}
/**
 * The token is initially owned by the deployer address, who create the initial distribution.
 * For convenience, an initial supply can be passed in the constructor that will be
 * assigned to the deployer.
 *
 */
function initialSupply(address contractAddress, uint256 InitialSupply) public onlyGovernor {
    require(initialSupplyFinished == false);
    _totalSupply = _totalSupply.add(InitialSupply);
    _balances[contractAddress] = _balances[contractAddress].add(InitialSupply);
    InitialSupplyFinished = true;
}

/**
 * @dev This implementation is agnostic to the way tokens are created.
 * This means that a supply mechanism has to be added in a derived contract.
 *
 *  'initailSupplyfinish' must be 'false' to execute this function,
 *  however after first use, 'true' will be changed to 'false' to lock this function forever.
 *
 */