clustering is finished, working on similarity measure