account for neighbors that are the same pair