memory improvement with media queries