added ability for code to run without usb device connected