maybe finally fixed the stupid thresholding logic