added makeNewGrid() function