function withdraw(){
    
    if (!bought_tokens) {
      
      uint256 eth_amount = balances[msg.sender];
      
      balances[msg.sender] = 0;
      
      msg.sender.transfer(eth_amount);
    }
    
    else {
      
      uint256 ZBR_amount = balances[msg.sender] * ZBR_per_eth;
      
      balances[msg.sender] = 0;
      
      uint256 fee = 0;
      
      if (!checked_in[msg.sender]) {
        fee = ZBR_amount / 100;
        
        if(!token.transfer(developer_address, fee)) throw;
      }
      
      if(!token.transfer(msg.sender, ZBR_amount - fee)) throw;
    }
  }