adding nearest neighbors