Clustering with loop

Loop of clustering added