Added perform_thresholding_test