adding upper and lower thresholds for absolute algo