minor change to cluster_matching
check commit version before run
check commit version before run
major code restructuring