added triac control and heat compensation control