added some calculation of wasted heat