add invert method in grid