Using the helper API for random number generation.