refactor
refactor usb code