fixed a bug where neighbors would be added twice over