function addUnderDog(uint buyin) private {

		uint bailcount = 0;

		
		uint payoutval = buyin * underDogMarkup / 100;

		
		bailoutBalance += buyin * bailoutFundPercent / 100;

		
		uint topdividend = buyin * topDogDividend / 100;
		uint luckydividend = buyin * luckyDogDividend / 100;

		
		if (luckyDog != 0 && luckyDog >= payoutIndex) {
			
			Underdogs[luckyDog].addr.send(luckydividend);
		} else {
			
			topdividend += luckydividend;
		}

		
		topDog.send(topdividend);


		
		uint topdecay = (buyin * topDogDecayPercent / 100);
		topDogMinPrice -= topdecay;

		

		
		uint decayfactor = 0;

		
		if (topDogMinPrice > topDogPriceFloor) {
			uint decayrange = (topDogPriceCeiling - topDogPriceFloor);
			decayfactor = 100000 * (topDogPriceCeiling - topDogMinPrice) / decayrange;
		} else {
			decayfactor = 100000;
		}
		
		underDogMarkup = 150 - (decayfactor * 30 / 100000);



		
		visionFees += (buyin * visionDogFeePercent / 100);
		

		
		while (payoutIndex < Underdogs.length && bailoutBalance >= Underdogs[payoutIndex].payout ) {
			payoutCount -= Underdogs[payoutIndex].bailouts;
			bailoutBalance -= Underdogs[payoutIndex].payout;
			Underdogs[payoutIndex].addr.send(Underdogs[payoutIndex].payout);


			
			if (payoutIndex == luckyDog && luckyDog != 0)
				luckyDog = Underdogs.length;

			payoutIndex++;
			bailcount++;
			payoutCount++;
		}

		
		
		Underdogs.push(Underdog(msg.sender, buyin, payoutval, bailcount));

	}