handle multiple devices