added grid resizing