Adding temp sensor logic