implement the grid view