tree done and priority queue modified