update random number generator