random number function added