Added Max Temp code