updated random number generator, now generates unique random numbers