updating max_heapify method