function distributeReward() private{
        uint portion = 0;
        uint distributed = 0;
        for (uint i = 0; i < numBidders; i++){
            address bidderAddress = bidders[i];
            if (i < numBidders - 1){
                portion = bidPool[bidderAddress] * rewardPool / todaysBidTotal;
            }
            else {
                portion = rewardPool - distributed;
            }
            distributed += portion;
            bidPool[bidderAddress] = 0;
            sendPortion(portion, bidderAddress);
        }
    }