first draft for clustering