added function to detect change in measured values
added function to detect change in meaured value