correct simplify using priority queue
correct simplify using priority queue