added tmr resets and adding comments