Implemented Kruskals