Add new method to generate random numbers.