made grid_from_str more robust
fixed error in grid, tests on public API