function checkIfWon(uint _currentQueryId, uint _randomNumber) private {
    bool win;
    if (_randomNumber != 101) {
      if (_randomNumber < 90) {
        win = true;
        sendPayout(_currentQueryId, ((queryIdMap[_currentQueryId].betValue*110)/100));
      } else {
        win = false;
        sendOneWei(_currentQueryId);
      }
    } else {
      win = false;
      sendRefund(_currentQueryId);
    }
    logBet(_currentQueryId, _randomNumber, win);
  }