Create helper functions for random number generation.