diff --git a/monitor/tach_sensor.cpp b/monitor/tach_sensor.cpp
index 8d8d37a..9a98e37 100644
--- a/monitor/tach_sensor.cpp
+++ b/monitor/tach_sensor.cpp
@@ -107,8 +107,7 @@
     tachSignal = std::make_unique<sdbusplus::server::match::match>(
                      _bus,
                      match.c_str(),
-                     handleTachChangeSignal,
-                     this);
+                     [this](auto& msg){ this->handleTachChange(msg); });
 
     if (_hasTarget)
     {
@@ -117,8 +116,7 @@
         targetSignal = std::make_unique<sdbusplus::server::match::match>(
                            _bus,
                            match.c_str(),
-                           handleTargetChangeSignal,
-                           this);
+                           [this](auto& msg){ this->handleTargetChange(msg); });
     }
 
 }
@@ -131,26 +129,6 @@
 }
 
 
-int TachSensor::handleTachChangeSignal(sd_bus_message* msg,
-                                       void* usrData,
-                                       sd_bus_error* err)
-{
-    auto m = sdbusplus::message::message(msg);
-    static_cast<TachSensor*>(usrData)->handleTachChange(m, err);
-    return 0;
-}
-
-
-int TachSensor::handleTargetChangeSignal(sd_bus_message* msg,
-                                         void* usrData,
-                                         sd_bus_error* err)
-{
-    auto m = sdbusplus::message::message(msg);
-    static_cast<TachSensor*>(usrData)->handleTargetChange(m, err);
-    return 0;
-}
-
-
 /**
  * @brief Reads a property from the input message and stores it in value.
  *        T is the value type.
@@ -184,8 +162,7 @@
 }
 
 
-void TachSensor::handleTargetChange(sdbusplus::message::message& msg,
-                                    sd_bus_error* err)
+void TachSensor::handleTargetChange(sdbusplus::message::message& msg)
 {
     readPropertyFromMessage(msg,
                             FAN_SENSOR_CONTROL_INTF,
@@ -197,8 +174,7 @@
 }
 
 
-void TachSensor::handleTachChange(sdbusplus::message::message& msg,
-                                  sd_bus_error* err)
+void TachSensor::handleTachChange(sdbusplus::message::message& msg)
 {
    readPropertyFromMessage(msg,
                            FAN_SENSOR_VALUE_INTF,
diff --git a/monitor/tach_sensor.hpp b/monitor/tach_sensor.hpp
index dd2222b..4691d1e 100644
--- a/monitor/tach_sensor.hpp
+++ b/monitor/tach_sensor.hpp
@@ -130,48 +130,20 @@
         std::string getMatchString(const std::string& interface);
 
         /**
-         * @brief Callback function for a tach input properties
-         *        changed signal
-         *
-         * @param[in] msg - the dbus message
-         * @param[in] data - user data
-         * @param[in] err - dbus error
-         */
-        static int handleTachChangeSignal(sd_bus_message* msg,
-                                          void* data,
-                                          sd_bus_error* err);
-
-        /**
-         * @brief Callback function for a Target properties
-         *        changed signal
-         *
-         * @param[in] msg - the dbus message
-         * @param[in] data - user data
-         * @param[in] err - dbus error
-         */
-        static int handleTargetChangeSignal(sd_bus_message* msg,
-                                            void* data,
-                                            sd_bus_error* err);
-
-        /**
          * @brief Reads the Target property and stores in _tachTarget.
          *        Also calls Fan::tachChanged().
          *
          * @param[in] msg - the dbus message
-         * @param[in] err - dbus error
          */
-        void handleTargetChange(sdbusplus::message::message& msg,
-                                sd_bus_error* err);
+        void handleTargetChange(sdbusplus::message::message& msg);
 
         /**
          * @brief Reads the Value property and stores in _tachInput.
          *        Also calls Fan::tachChanged().
          *
          * @param[in] msg - the dbus message
-         * @param[in] err - dbus error
          */
-        void handleTachChange(sdbusplus::message::message& msg,
-                              sd_bus_error* err);
+        void handleTachChange(sdbusplus::message::message& msg);
 
 
         /**
