@ grid.cs: almost done