Tested OK with positive upper and lower thresholds.  Fixed problem with handling out of range at startup.  Now modified to test with negative lower threshold