diff --git a/MeshLib/CoordinateSystem.cpp b/MeshLib/CoordinateSystem.cpp
index c2c7d85a173323bb512006b40f74fe0127a41ec4..48cea5073664419f0346321d6d0bbf8dd06cd90e 100644
--- a/MeshLib/CoordinateSystem.cpp
+++ b/MeshLib/CoordinateSystem.cpp
@@ -9,9 +9,41 @@
 
 #include "CoordinateSystem.h"
 
+#include <cmath>
+
+#include "GeoLib/AABB.h"
 #include "MeshLib/Elements/Element.h"
 #include "MeshLib/Node.h"
 
+namespace
+{
+unsigned char getCoordinateSystem(GeoLib::AABB const& bbox)
+{
+    unsigned char coords = 0;
+
+    auto const [bbox_min, bbox_max] = bbox.getMinMaxPoints();
+    Eigen::Vector3d const pt_diff = bbox_max - bbox_min;
+
+    // The axis aligned bounding box is a from the right half-open interval.
+    // Therefore, the difference between the particular coordinates of the
+    // points is modified by the unit in the last place towards zero.
+    if (std::nexttoward(std::abs(pt_diff[0]), 0.0) > .0)
+    {
+        coords |= MeshLib::CoordinateSystemType::X;
+    }
+    if (std::nexttoward(std::abs(pt_diff[1]), 0.0) > .0)
+    {
+        coords |= MeshLib::CoordinateSystemType::Y;
+    }
+    if (std::nexttoward(std::abs(pt_diff[2]), 0.0) > .0)
+    {
+        coords |= MeshLib::CoordinateSystemType::Z;
+    }
+
+    return coords;
+}
+}  // namespace
+
 namespace MeshLib
 {
 CoordinateSystem::CoordinateSystem(const Element& ele)
@@ -40,31 +72,9 @@ CoordinateSystem::CoordinateSystem(const Element& ele)
     }
 }
 
-unsigned char CoordinateSystem::getCoordinateSystem(
-    const GeoLib::AABB& bbox) const
+CoordinateSystem::CoordinateSystem(GeoLib::AABB const& bbox)
+    : _type(getCoordinateSystem(bbox))
 {
-    unsigned char coords = 0;
-
-    auto const [bbox_min, bbox_max] = bbox.getMinMaxPoints();
-    Eigen::Vector3d const pt_diff = bbox_max - bbox_min;
-
-    // The axis aligned bounding box is a from the right half-open interval.
-    // Therefore, the difference between the particular coordinates of the
-    // points is modified by the unit in the last place towards zero.
-    if (std::nexttoward(std::abs(pt_diff[0]), 0.0) > .0)
-    {
-        coords |= CoordinateSystemType::X;
-    }
-    if (std::nexttoward(std::abs(pt_diff[1]), 0.0) > .0)
-    {
-        coords |= CoordinateSystemType::Y;
-    }
-    if (std::nexttoward(std::abs(pt_diff[2]), 0.0) > .0)
-    {
-        coords |= CoordinateSystemType::Z;
-    }
-
-    return coords;
 }
 
 }  // namespace MeshLib
diff --git a/MeshLib/CoordinateSystem.h b/MeshLib/CoordinateSystem.h
index 7df8ccb9bb8d506fc887d2b56cf6bcc4c98dc917..fdf5cf0d3cbed20b2a3deafe63c09344287c94e1 100644
--- a/MeshLib/CoordinateSystem.h
+++ b/MeshLib/CoordinateSystem.h
@@ -9,9 +9,10 @@
 
 #pragma once
 
-#include <cmath>
-
-#include "GeoLib/AABB.h"
+namespace GeoLib
+{
+class AABB;
+}
 
 namespace MeshLib
 {
@@ -45,10 +46,7 @@ public:
     explicit CoordinateSystem(const Element& ele);
 
     /// Decides a coordinate system from a bounding box
-    explicit CoordinateSystem(const GeoLib::AABB& bbox)
-        : _type(getCoordinateSystem(bbox))
-    {
-    }
+    explicit CoordinateSystem(const GeoLib::AABB& bbox);
 
     /// get this coordinate type
     unsigned char getType() const { return _type; }
@@ -78,8 +76,6 @@ public:
     bool hasZ() const { return (_type & CoordinateSystemType::type::Z) != 0; }
 
 private:
-    unsigned char getCoordinateSystem(const GeoLib::AABB& bbox) const;
-
     unsigned char _type;
 };