Tools to generate random numbers