implements resizableGrid functionality