reimplement maxheap with set, need debug