added heat calculation