Added some helper methods to Kruskal