generate gird