add random number generator.