Clustering for networks