start of hierarchical clustering technique