custom function to call each time the value is updated
custom function to call each time the value is updated