diff --git a/include/laser/utils/laser3d_tools.h b/include/laser/utils/laser3d_tools.h
index bb8d56fd1752ef80d251259a5a5d67b4b5aba511..b96b709c2babc74975ad1d1f897843b403a169c0 100644
--- a/include/laser/utils/laser3d_tools.h
+++ b/include/laser/utils/laser3d_tools.h
@@ -40,6 +40,14 @@ typedef pcl::Registration<pcl::PointXYZ, pcl::PointXYZ>::Ptr RegistrationPtr;
 
 namespace wolf
 {
+void loadData(std::string fname, pcl::PointCloud<pcl::PointXYZ>& cloud)
+{
+    pcl::io::loadPCDFile(fname, cloud);
+    // remove NAN points from the cloud
+    pcl::Indices indices;
+    pcl::removeNaNFromPointCloud(cloud, cloud, indices);
+};
+
 // _cloud_ref: first PointCloud
 // _cloud_other: second PointCloud
 inline void pairAlign(const pcl::PointCloud<pcl::PointXYZ>::Ptr _cloud_ref,
diff --git a/test/gtest_laser3d_tools.cpp b/test/gtest_laser3d_tools.cpp
index 19fd82e5fb245cd64b03b9ab3c818a0f5423f775..416fb0a205d2d3c805989bdf995af9c84f6c2da3 100644
--- a/test/gtest_laser3d_tools.cpp
+++ b/test/gtest_laser3d_tools.cpp
@@ -51,13 +51,6 @@ using namespace Eigen;
 
 std::string laser_root_dir = _WOLF_LASER_ROOT_DIR;
 
-void loadData(std::string fname, pcl::PointCloud<pcl::PointXYZ>& cloud)
-{
-    pcl::io::loadPCDFile(fname, cloud);
-    // remove NAN points from the cloud
-    pcl::Indices indices;
-    pcl::removeNaNFromPointCloud(cloud, cloud, indices);
-};
 
 TEST(pairAlign, identity)
 {
diff --git a/test/gtest_processor_odom_icp_3d.cpp b/test/gtest_processor_odom_icp_3d.cpp
index a372ecb11087c23302eb41b37a155e9d52f6b09d..a33b3c2e07641934efc5d18fb824e13c976b7f4e 100644
--- a/test/gtest_processor_odom_icp_3d.cpp
+++ b/test/gtest_processor_odom_icp_3d.cpp
@@ -48,13 +48,6 @@ using namespace wolf;
 
 std::string laser_root_dir = _WOLF_LASER_ROOT_DIR;
 
-void loadData(std::string fname, pcl::PointCloud<pcl::PointXYZ>& cloud)
-{
-    pcl::io::loadPCDFile(fname, cloud);
-    // remove NAN points from the cloud
-    pcl::Indices indices;
-    pcl::removeNaNFromPointCloud(cloud, cloud, indices);
-};
 
 class Test_ProcessorOdomIcp3D_yaml : public testing::Test
 {