updated usb code