updated grid to make layout a toggle