Updated the Randon Number Generator to do the correct thing