worked out logic for temperature change dialog box