add neighbor func
1st version