basis for mst algorithm added