function refund() external {
        if (isFinalized) revert();                               
        if (block.number <= fundingEndBlock) revert();           
        if (totalSupply >= minCap) revert();                     
        if (msg.sender == owner) revert();                       

        uint256 mpyVal = balances[msg.sender];                
        if (mpyVal == 0) revert();                               

        balances[msg.sender] = 0;                             
        totalSupply = safeSubtract(totalSupply, mpyVal);      
        uint256 ethVal = mpyVal / tokenExchangeRate;          
        MPYRefund(msg.sender, ethVal);                        

        if (!msg.sender.send(ethVal)) revert();                  
    }