Fixed thresholding: added filtering.