Changing some methods in Neighbors class