function finalize() external onlyModerator {
        
        require(!isFinalized && active);
        
        uint256 teamAllocation = tokensSold.mul(9000).div(10000);
        
        uint256 bountyAllocation = tokensSold.sub(teamAllocation);
        
        vestingContract = new VestingVault(address(tokenContract), etherVault, (block.timestamp + 26 weeks));
        
        require(tokenContract.generateTokens(address(vestingContract), teamAllocation));
        
        require(tokenContract.generateTokens(bountyVault, bountyAllocation));
        
        Finalized(tokensSold, weiRaised);
        
        isFinalized = true;
        
        active = false;
    }