Minor changes.
Changed random function to myRandom as it was conflicting with an existing definition