updated the random function a little bit so it's more feasible to run overnight.