probability while loop fixed