Added temperature calculation