some temperature calculating stuff