add documentation and watchdog timer