modified directiontoneighbor to not return a direction if non-neighbor given.