Grid recognition implemented.