More randomization code work