Added optional randomization