simplified grid_toggle() function