the most annoying calculation (temp sensor added)