completed initial minheap implementation