add minimum spanning tree