added assertion in grid testing.