added optimal single linkage hierarchical clustering
removed temp output from here
pointer to parents
removed bugs