added hierarchical clustering