diff --git a/src/AlgorithmKruskal.php b/src/AlgorithmKruskal.php
index <HASH>..<HASH> 100644
--- a/src/AlgorithmKruskal.php
+++ b/src/AlgorithmKruskal.php
@@ -106,10 +106,14 @@ class AlgorithmKruskal{
 			//=> nichts machen
 		}
 		
-		if(count($colorVertices) !== 1){
-		    throw new Exception('Graph is not connected');
+		if (count( $newGraph->getEdges() ) !== ( $newGraph->getSize() - 1 ) ){
+			throw new Exception('Graph is not connected');
 		}
 		
+/*		if(count($colorVertices) !== 1){
+		    throw new Exception('Graph is not connected');
+		}
+*/		
 		return $newGraph;
 	}
changed check for connected vertices
changed check for all connected vertices from color check (don't work
for isolated vertices) to check of definition of spanning tree:
edges = vertices - 1