refactored how media queries are set