Now uses Kruskal properly