selector refactor
support multiple devices