comuteFindNeighbours code added