modified to update both desiredTemp and currentTemp