private void heapifyDown(int index) {
		int leftChildIndex = index * 2 + 1;
		int rightChildIndex = index * 2 + 2;
		int swapIndex = index;

		// if left child exists and lesser than current node
		if (leftChildIndex < currentIndex) {
			if (heap.get(leftChildIndex).compareTo(heap.get(swapIndex)) < 0)
				swapIndex = leftChildIndex;

			// if right child exists and lesser than current node and left child
			if (rightChildIndex < currentIndex) {
				if (heap.get(rightChildIndex).compareTo(heap.get(swapIndex)) < 0)
					swapIndex = rightChildIndex;
			}
		}
		
		if (swapIndex != index) { // swap if necessary
			E temp = heap.get(index);
			heap.set(index, heap.get(swapIndex));
			heap.set(swapIndex, temp);

			heapifyDown(swapIndex); // check next level down
		}
	}