grid data structure