correct the randomization