changed return value of usbPlugged() back to int