changed to weightedmultigraph