How might we parameterize this so we could more easily swap the metric used to weight the arcs?