diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index f2a8302..eead545 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -84,32 +84,36 @@
   return adj;
 }
 
-static bool
-compareAdjacent(const Adjacent& adjacent1, const Adjacent& adjacent2)
-{
-  return adjacent1.getName() < adjacent2.getName();
-}
-
 bool
-AdjacencyList::operator==(AdjacencyList& adl)
+AdjacencyList::operator==(AdjacencyList& adl) const
 {
-  if (getSize() != adl.getSize()) {
+  if (m_adjList.size() != adl.getSize()) {
     return false;
   }
-  m_adjList.sort(compareAdjacent);
-  adl.getAdjList().sort(compareAdjacent);
-  uint32_t equalAdjCount = 0;
-  std::list<Adjacent>& adjList2 = adl.getAdjList();
-  std::list<Adjacent>::iterator it1;
-  std::list<Adjacent>::iterator it2;
-  for (it1 = m_adjList.begin(), it2 = adjList2.begin();
-       it1 != m_adjList.end(); it1++, it2++) {
-    if (!((*it1) == (*it2))) {
-      break;
+
+  auto comparator =
+    [] (const Adjacent* lhs, const Adjacent* rhs) {
+      return *lhs < *rhs;
+  };
+
+  std::vector<const Adjacent*> ourList;
+  std::transform(m_adjList.begin(), m_adjList.end(),
+                 std::back_inserter(ourList), std::pointer_traits<const Adjacent*>::pointer_to);
+
+  std::vector<const Adjacent*> theirList;
+  std::transform(adl.getAdjList().begin(), adl.getAdjList().end(),
+                 std::back_inserter(theirList), std::pointer_traits<const Adjacent*>::pointer_to);
+
+  std::sort(ourList.begin(), ourList.end(), std::bind(comparator, _1, _2));
+  std::sort(theirList.begin(), theirList.end(), std::bind(comparator, _1, _2));
+
+  for (size_t i = 0; i < ourList.size(); i++) {
+    if (*(ourList[i]) != *(theirList[i])) {
+      std::cout << *ourList[i] << ":" << *theirList[i];
+      return false;
     }
-    equalAdjCount++;
   }
-  return equalAdjCount == getSize();
+  return true;
 }
 
 int32_t
