Added vizualization code for grid