added variable to get difference between sensors