working on graph edge weighting