fixed my random number loop