func: function cause it can take quite a bit of gas, around 1Mio gas
      public
      {
          RequireHuman();
          require(isactive);
          
          uint256 _rID = roundID;
          require(Rounds[_rID].teamcnt>0); 
  
          uint256 _pot = Rounds[_rID].pot;
          uint256 fee =_pot/20; 
          uint256 nextpot = _pot/20; 
          uint256 finalpot = _pot-fee-nextpot; 
          
          
          uint256 _roundstart=Rounds[_rID].roundstart;
          uint256 _now=block.timestamp;
          require(_roundstart+Rounds[_rID].trucetime<_now);
  
  
          uint256[] memory _owners_ = new uint256[](86);
          for (uint16 i = 0;i<86;i++){ 
              _owners_[i]=Rounds[_rID].owners[i];
          }
  
          uint16 t;
          uint16 team;
          uint16 j;
          for ( i = 1; i<uint16(2750);i++){ 
              t=getownership2(i,_owners_[i/32]);
              if (t!=uint16(0)){
                  team=t;
                  j=i+1;
                  break;
              }
          }
          
          for ( i = j; i<uint16(2750);i++){ 
              t=getownership2(i,_owners_[i/32]);
              if(t>0){
                  if(t!=team){
                      require(false);
                  }
              }
          }
          Rounds[_rID].teampotshare[team]=finalpot; 
          Rounds[_rID].winner=Rounds[_rID].nationnameXteam[team];
          
          
          admin.transfer(fee);
          
          
          
          _rID+=1;
          Rounds[_rID].trucetime =trucetime;
          Rounds[_rID].roundstart =block.timestamp;
          Rounds[_rID].beginterritories =beginterritories; 
          Rounds[_rID].maxroll = maxroll;
          Rounds[_rID].pot = nextpot;
          Rounds[_rID].price = price;
          Rounds[_rID].maxextensiontruce = maxextensiontruce;
          roundID=_rID;
          
          emit onendround();
      }