check if degree is correct in updateEdges
diff --git a/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java b/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java
index d06806a..700b3b5 100644
--- a/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java
+++ b/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java
@@ -421,11 +421,15 @@
         switch (replaceDir) {
             case DirectionFlag.DIR_FF:
             case DirectionFlag.DIR_FR:
+                if (other.inDegree() != 1)
+                    throw new IllegalStateException("In update, expected other node's indegree to be 1!" + this + other);
                 edges[updateDir].unionUpdate(other.edges[DirectionFlag.DIR_RF]);
                 edges[updateDir].unionUpdate(other.edges[DirectionFlag.DIR_RR]);
                 break;
             case DirectionFlag.DIR_RF:
             case DirectionFlag.DIR_RR:
+                if (other.outDegree() != 1)
+                    throw new IllegalStateException("In update, expected other node's outdegree to be 1!" + this + other);
                 edges[updateDir].unionUpdate(other.edges[DirectionFlag.DIR_FF]);
                 edges[updateDir].unionUpdate(other.edges[DirectionFlag.DIR_FR]);
                 break;