loop through whole grid