bad minheap implementation