Make it able to detect loss and gain thresholds