final working spanning tree