changed distance methods of Hierarchical clustering