added active state toggle for grids button