created 2D grid for searching
looping through grid