refacoted heapify donw