add code for clustering data