removed the need for config arg in getNeighbors