provide method for getting a random number