added demo3 -- using watchdog as a timer