contract TreasuryCrowdsale is FinalizableCrowdsale {
    using SafeMath for uint256;

    TokenTimelock public treasuryTimelock;

    // mint treasury supply a single time after finalization (~3% unlocked, ~20% locked for 2 years)
    function _finalization() internal {
        uint256 treasuryAmountUnlocked = token().totalSupply().mul(4).div(100);
        uint256 treasuryAmountLocked = token().totalSupply().mul(25).div(100);
        treasuryTimelock = new TokenTimelock(
            token(),
            wallet(),
            block.timestamp.add(60 * 60 * 24 * 365 * 2), // 2 years
            treasuryAmountLocked
        );
        ERC20Mintable(address(token())).mint(wallet(), treasuryAmountUnlocked);
        ERC20Mintable(address(token())).mint(address(treasuryTimelock), treasuryAmountLocked);
        super._finalization();
    }
}
function _finalization() internal {
    uint256 treasuryAmountUnlocked = token().totalSupply().mul(4).div(100);
    uint256 treasuryAmountLocked = token().totalSupply().mul(25).div(100);
    treasuryTimelock = new TokenTimelock(
        token(),
        wallet(),
        block.timestamp.add(60 * 60 * 24 * 365 * 2), // 2 years
        treasuryAmountLocked
    );
    ERC20Mintable(address(token())).mint(wallet(), treasuryAmountUnlocked);
    ERC20Mintable(address(token())).mint(address(treasuryTimelock), treasuryAmountLocked);
    super._finalization();
}

// mint treasury supply a single time after finalization (~3% unlocked, ~20% locked for 2 years)