Random number function added