Second commit. Randomization added.