function finalize() onlyOwner {
        require( (!saleCompleted) && (totalTokens >= tokenGenerationMin) );
        saleCompleted = true;
        end_block = block.number;
        reserveBalance = safeDiv(safeMul(this.balance, percentageETHReserve), 100);
        var withdrawalBalance = safeSub(this.balance, reserveBalance);
        msg.sender.transfer(withdrawalBalance);
    }