Modified code to use ofRandom() any time a random number is needed