minimal spanning tree, coded, need tests