diff --git a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java
index f19e1b2e6bfde0062fa79717b1cd093c074dd538..171fe14674b935ddd03606c968333d875820820d 100644
--- a/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java
+++ b/model/src/main/java/lcsb/mapviewer/model/map/model/ModelComparator.java
@@ -120,7 +120,8 @@ public class ModelComparator extends Comparator<Model> {
       return status;
     }
 
-    status = compareReaction(arg0.getReactions(), arg1.getReactions());
+    SetComparator<Reaction> reactionSetComparator = new SetComparator<>(new ReactionComparator(epsilon));
+    status = reactionSetComparator.compare(arg0.getReactions(), arg1.getReactions());
     if (status != 0) {
       logger.debug("Set of reactions different");
       return status;
@@ -173,47 +174,6 @@ public class ModelComparator extends Comparator<Model> {
     return 0;
   }
 
-  /**
-   * Compares two set of reactions.
-   * 
-   * @param reactions
-   *          first set of reactions
-   * @param reactions2
-   *          second set of reactions
-   * @return if sets are equal then returns 0. If they are different then -1/1 is
-   *         returned.
-   */
-  private int compareReaction(Set<Reaction> reactions, Set<Reaction> reactions2) {
-    ReactionComparator comparator = new ReactionComparator(epsilon);
-
-    Map<String, Reaction> map = new HashMap<String, Reaction>();
-    Map<String, Reaction> map2 = new HashMap<String, Reaction>();
-
-    for (Reaction reaction : reactions) {
-      map.put(reaction.getIdReaction(), reaction);
-    }
-    for (Reaction reaction : reactions2) {
-      map2.put(reaction.getIdReaction(), reaction);
-    }
-
-    for (Reaction reaction : reactions) {
-      int status = comparator.compare(reaction, map2.get(reaction.getIdReaction()));
-      if (status != 0) {
-        logger.debug("Different reaction " + reaction.getIdReaction() + ": " + map2.get(reaction.getIdReaction()));
-        return status;
-      }
-    }
-
-    for (Reaction reaction : reactions2) {
-      int status = comparator.compare(reaction, map.get(reaction.getIdReaction()));
-      if (status != 0) {
-        logger.debug("Different reaction " + reaction.getIdReaction());
-        return status;
-      }
-    }
-    return 0;
-  }
-
   /**
    * Compares two sets of layers.
    *