added hysteresis thresholding module