fixed thermocpuple code parts