ReImplemented the neighbouring scheme
Futher testing needed to comfirm that correctness