Changed Rubin's to use a real priority queue