see cluster_extraction.cpp line 60