this is nice, but kruskal's needs fixing