use priority queue to get max