Added minimum spanning tree method.