Implemented new way to create the grid