renamed rebuildHeap as sink