Add randomization functionality