Neighbor Algorithm implemented