cell_grid using malloc/free, also retabbed