implemented just enough neighbors technique