Added a pseudo-random number generator.