use comparison operator variable for widget's thresholds
minor style change
use comparison operator variable for widget's thresholds