Created helper method to build grid.