implementing neighborset