finding neighbors using a uniform grid