Updated script for random group comparisons