function withdrawForBet(address addr, uint256 value) isLottery external {
    combineBonuses(addr);
    uint256 extraEarnings = users_[addr].extraEarnings; 
    if (extraEarnings >= value) {
      users_[addr].extraEarnings -= value;    
    } else {
      users_[addr].extraEarnings = 0;
      uint256 remain = value - extraEarnings;
      require(users_[addr].bonusEarnings >= remain);
      users_[addr].bonusEarnings -= remain;
    }
    Lottery.deposit.value(value)();
  }