tested finding the MST once the weights are calculated