added functionality to switch between USB and BT