Setting up the random number generator