Add the gridArray variable to createGrid