Add some more infrastructure, eg, priority queue