prims now work and yield the correct mst sum weight