Implemented different random number generators.