Added batch randomization