refactored ui to support multiple devices