refactored media queries