Random number generator related utilities