added device swicht feature