Added cdtemp function.