add factory reset support (not-full yet)