header files for grid.cpp