diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index d5e6dfe..bd6783c 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -87,32 +87,14 @@
 bool
 AdjacencyList::operator==(const AdjacencyList& adl) const
 {
-  if (size() != adl.size()) {
+  if (m_adjList.size() != adl.getAdjList().size()) {
     return false;
   }
 
-  auto comparator =
-    [] (const Adjacent* lhs, const Adjacent* rhs) {
-      return *lhs < *rhs;
-  };
+  std::set<Adjacent> ourList(m_adjList.cbegin(), m_adjList.cend());
+  std::set<Adjacent> theirList(adl.getAdjList().cbegin(), adl.getAdjList().cend());
 
-  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])) {
-      return false;
-    }
-  }
-  return true;
+  return ourList == theirList;
 }
 
 int32_t
