common random number generator