Reduce the stuff to just the random number generation.