add option to select whose data is used to calculate threshold:
Change opt.thresholdSubjectIndex