finished implementing NeighbourhoodGraph constructor