remove commented code
fix finding neighbors with discontinuities