begin build heap.