added code to convert labels to array in make_threshold_diff