function play(uint256 betPerRoll, uint16 rolls, uint8 rollUnder) public payable {

		require(!GAMEPAUSED
				&& msg.value > 0
				&& betPerRoll >= MINBET
				&& rolls > 0
				&& rolls <= 1024
				&& betPerRoll <= msg.value
				&& rollUnder > 1
				&& rollUnder < 100
				
				&& (SafeMath.mul(betPerRoll, 100) / (rollUnder - 1)) <= getMaxWin());

		
		if (betPerRoll < MINBET_forORACLIZE) {

			
			
			bytes32 blockHash = block.blockhash(block.number);
			uint8 houseEdgeInThousandthPercents = HOUSEEDGE_inTHOUSANDTHPERCENTS;

			
			
			
			
			
			uint256 etherAvailable = msg.value;

			
			uint256[] memory logsData = new uint256[](4);

			uint256 winnings;
			uint16 gamesPlayed;

			
			uint256 hypotheticalWinAmount = SafeMath.mul(SafeMath.mul(betPerRoll, 100), (1000 - houseEdgeInThousandthPercents)) / (rollUnder - 1) / 1000;

			while (gamesPlayed < rolls && etherAvailable >= betPerRoll){
				

				if (uint8(uint256(keccak256(blockHash, gamesPlayed)) % 100) + 1 < rollUnder){
					
					
					winnings = hypotheticalWinAmount;

					
					
					
					

					if (gamesPlayed <= 255){
						logsData[0] += uint256(2) ** (255 - gamesPlayed);
					}
					else if (gamesPlayed <= 511){
						logsData[1] += uint256(2) ** (511 - gamesPlayed);
					}
					else if (gamesPlayed <= 767){
						logsData[2] += uint256(2) ** (767 - gamesPlayed);
					}
					else {
						
						logsData[3] += uint256(2) ** (1023 - gamesPlayed);
					}
				}
				else {
					
					winnings = 1;
					
				}
				
				gamesPlayed++;

				
				etherAvailable = SafeMath.sub(SafeMath.add(etherAvailable, winnings), betPerRoll);
			}

			
			GAMESPLAYED += gamesPlayed;
			
			AMOUNTWAGERED = SafeMath.add(AMOUNTWAGERED, SafeMath.mul(betPerRoll, gamesPlayed));

			
			
			uint256 developersCut = SafeMath.mul(SafeMath.mul(betPerRoll, houseEdgeInThousandthPercents), gamesPlayed) / 5000;

			
			DEVELOPERSFUND = SafeMath.add(DEVELOPERSFUND, developersCut);

			
			EOSBetBankrollInterface(BANKROLLER).receiveEtherFromGameAddress.value(SafeMath.sub(msg.value, developersCut))();

			
			EOSBetBankrollInterface(BANKROLLER).payEtherToWinner(etherAvailable, msg.sender);

			
			emit DiceSmallBet(gamesPlayed, logsData[0], logsData[1], logsData[2], logsData[3]);
		}

		
		
		
		
		else {
			
			bytes32 oraclizeQueryId;

			
			

			EOSBetBankrollInterface(BANKROLLER).payOraclize(oraclize_getPrice('random', INITIALGASFORORACLIZE + (uint256(1005) * rolls)));

			oraclizeQueryId = oraclize_newRandomDSQuery(0, 30, INITIALGASFORORACLIZE + (uint256(1005) * rolls));

			diceData[oraclizeQueryId] = DiceGameData({
				player : msg.sender,
				paidOut : false,
				start : block.timestamp,
				etherReceived : msg.value,
				betPerRoll : betPerRoll,
				rolls : rolls,
				rollUnder : rollUnder
			});

			
			
			LIABILITIES = SafeMath.add(LIABILITIES, msg.value);

			
			emit BuyRolls(oraclizeQueryId);
		}
	}