modified grid_graph generator to not mutate input parameters