refactored grid and added media queries