added getNeighbors, getMatchingGroup