Changed the way the randomizing is done.