func: function accept(uint _brickId, address[] _winners, uint[] _weights, uint _value) 
          external onlyMain
          returns (uint) 
      {
          require(bricks[_brickId].status == BrickStatus.Active);
          require(_winners.length == _weights.length);
          
  
          uint total = 0;
          bool included = false;
          for (uint i = 0; i < _winners.length; i++) {
              
              require(_winners[i] != tx.origin, "Owner should not win this himself");
              for (uint j =0; j < bricks[_brickId].numBuilders; j++) {
                  if (bricks[_brickId].builders[j].addr == _winners[i]) {
                      included = true;
                      break;
                  }
              }
              total = total.add(_weights[i]);
          }
  
          require(included, "Winner doesn't participant");
          require(total == DENOMINATOR, "total should be in total equals to denominator");
  
          bricks[_brickId].status = BrickStatus.Completed;
          bricks[_brickId].winners = _winners;
          
          bricks[_brickId].dateCompleted = uint32(now);
  
          if (_value > 0) {
              bricks[_brickId].value = bricks[_brickId].value.add(_value);
          }
  
          return bricks[_brickId].value;
      }