added formulae to calc temp