device switching works