Need some help understanding how randomization works in CAS