initial detecting USB devices code