added kruskal and prim algorithm