change minimum spanning tree implement, use union-find data structure to solve Kruskal algorithmn