function finalize(uint256 _round) public {
      Round storage round = rounds[_round];
      
      require(block.timestamp > round.endTime && round.activated && !round.finalized);
      
      
      
      
    
      
      round.finalized = true;
      uint256 pool2Next = 0;
      if(round.winner != address(0)) {
        players[round.winner].win = round.pool.add(players[round.winner].win);
        playerRoundData[round.winner][_round].win = round.pool.add(playerRoundData[round.winner][_round].win);

        emit Winner(round.winner, _round, round.pool);
      } else {
        
        
        
        pool2Next = round.pool;
      }
      
      emit FinalizeRound(_round);
      
      if (_round == (maxRound.sub(1))) {
          
          
          
          ownerPool = ownerPool.add(pool2Next);
          return;
      }

      Round storage next = rounds[nextRound];
      
      if (nextRound == maxRound) {
          next = rounds[maxRound - 1];
      }
      
      next.pool = pool2Next.add(next.pool);
      
      if(!next.activated && nextRound == (_round.add(1))) {
          
          
          next.activated = true;
          next.endTime = block.timestamp.add(next.roundTime);
          

          emit NewRound(nextRound, next.pool);

          if(nextRound < maxRound) {
            nextRound = nextRound.add(1);
          }
      }
  }