function withdraw() payable {
    
    if(block.number > 4199999 && iou_purchased[msg.sender] > token.balanceOf(address(this))) {
      
      
      uint256 eth_to_refund = eth_sent[msg.sender];

      
      if(eth_to_refund == 0 || iou_purchased[msg.sender] == 0) throw;

      
      total_iou_purchased -= iou_purchased[msg.sender];

      
      eth_sent[msg.sender] = 0;
      iou_purchased[msg.sender] = 0;

      msg.sender.transfer(eth_to_refund);
      return;
    }

    
    if(token.balanceOf(address(this)) == 0 || iou_purchased[msg.sender] > token.balanceOf(address(this))) throw;

    uint256 iou_to_withdraw = iou_purchased[msg.sender];
    uint256 eth_to_release = eth_sent[msg.sender];

    
    if(iou_to_withdraw == 0 || eth_to_release == 0) throw;

    
    iou_purchased[msg.sender] = 0;
    eth_sent[msg.sender] = 0;

    
    token.transfer(msg.sender, iou_to_withdraw);

    
    seller.transfer(eth_to_release);
  }