added dendrogram code