clean up grid indexing