media queries and refactor