add usb code (not quite working yet)