function winnerDecided(uint _hGame, address _winner, uint _winnerBal) public
        {
                if (!validArb(msg.sender, ArbTokFromHGame(_hGame))) {
                        StatEvent("Invalid Arb");
                        return; 
                }

                var (valid, pidx) = validPlayer(_hGame, _winner);
                if (!valid) {
                        StatEvent("Invalid Player");
                        return;
                }

                arbiter xarb = arbiters[msg.sender];
                gameInstance xgame = games[_hGame];

                if (xgame.playerPots[pidx] < _winnerBal) {
                    abortGame(_hGame, EndReason.erCancel);
                    return;
                }

                xgame.active = false;
                xgame.reasonEnded = EndReason.erWinner;
                numGamesCompleted++;

                if (xgame.totalPot > 0) {
                        
                        uint _escrowFee = (xgame.totalPot * xarb.escFeePctX10) / 1000;
                        uint _arbiterFee = (xgame.totalPot * xarb.arbFeePctX10) / 1000;
                        if ((_escrowFee + _arbiterFee) > xarb.feeCap) {
                                _escrowFee = xarb.feeCap * xarb.escFeePctX10 / (xarb.escFeePctX10 + xarb.arbFeePctX10);
                                _arbiterFee = xarb.feeCap * xarb.arbFeePctX10 / (xarb.escFeePctX10 + xarb.arbFeePctX10);
                        }
                        uint _payout = xgame.totalPot - (_escrowFee + _arbiterFee);
                        uint _gasCost = tx.gasprice * (startGameGas + winnerDecidedGas);
                        if (_gasCost > _payout)
                                _gasCost = _payout;
                        _payout -= _gasCost;

                        
                        xarb.arbHoldover += uint128(_arbiterFee + _gasCost);
                        houseFeeHoldover += _escrowFee;

                        if ((houseFeeHoldover > houseFeeThreshold)
                            && (now > (lastPayoutTime + payoutInterval))) {
                                uint ntmpho = houseFeeHoldover;
                                houseFeeHoldover = 0;
                                lastPayoutTime = now; 
                                if (!tokenPartner.call.gas(tokCallGas).value(ntmpho)()) {
                                        houseFeeHoldover = ntmpho; 
                                        StatEvent("House-Fee Error1");
                                } 
                        }

                        if (_payout > 0) {
                                if (!_winner.call.gas(acctCallGas).value(uint(_payout))()) {
                                        
                                        
                                        
                                        
                                        houseFeeHoldover += _payout;
                                        StatEventI("Payout Error!", _hGame);
                                } else {
                                        
                                }
                        }
                }
        }