diff --git a/p348reco/example.cc b/p348reco/example.cc
index 5172c9281fd9903fdca5b7dbff080f7df5af0d33..d67bf6679e6c755a0f4dc2cb1b620a7742be5cd3 100644
--- a/p348reco/example.cc
+++ b/p348reco/example.cc
@@ -1,6 +1,7 @@
 // DaqDataDecoding
 #include "DaqEventsManager.h"
 #include "DaqEvent.h"
+#include <algorithm>
 using namespace CS;
 
 // ROOT
@@ -290,18 +291,28 @@ int main(int argc, char *argv[])
         //     lower_bound(t) will return first element that is not considered
         //     to go before t, i.e. equal or greater than given k. Iterating
         //     from this element will result on clusters ascending by time
-        std::cout << "Clusters going after master time = " << e.masterTime << ":" << std::endl;
-        for( auto it = selection.by_time().lower_bound(e.masterTime)
-           ; it != selection.by_time().end()
-           ; ++it
-           ) {
-            std::ostringstream oss;
-            auto & entry = *it;
-            const na64util::p348reco::TimeClusterStats & cluster
-                = *entry.second->second.second;
-            oss << "  id=" << entry.second->first << ", t'="
-                << cluster.mean_time() - e.masterTime;
-            std::cout << oss.str() << std::endl;
+        std::cout << "Clusters by distance from master time = " << e.masterTime << ":" << std::endl;
+        {
+            std::multimap<double, na64util::p348reco::TimeClusters::Selection::iterator>
+                byTimeDist;
+            std::transform( selection.by_time().begin(), selection.by_time().end()
+                    , std::inserter(byTimeDist, byTimeDist.end())
+                    , [&]( auto & p ) {
+                        return std::pair<double, na64util::p348reco::TimeClusters::Selection::iterator>(
+                                std::fabs(e.masterTime - p.first), p.second);
+                    } );
+            for( auto it = byTimeDist.begin()
+               ; it != byTimeDist.end()
+               ; ++it
+               ) {
+                std::ostringstream oss;
+                auto & entry = *it;
+                const na64util::p348reco::TimeClusterStats & cluster
+                    = *entry.second->second.second;
+                oss << "  id=" << entry.second->first << ", t'="
+                    << cluster.mean_time() - e.masterTime;
+                std::cout << oss.str() << std::endl;
+            }
         }
         //break;
     }