Algorithm is fine. BTW, if I look inside hmtk/seismicity/declusterer I see that only classes are registered, is there a case when plain functions are registered?