Working Of A Heat Engine