Java compliance change.
Horribly inefficient using random numbers.