added watchdog timer, not yet called in main functon