wrote randomization script from scratch