spanning tree graph works now