max pq with links wip