add upgrade function to watchdog