private int percolateDown(int hole, E value){
		while(hole*4 + 1 <= index){
			// compare the four children of the given hole find out the one with smallest value
			// for the index i, its parent index is (i-1)/4, its children are 4i+1,..,4i+4
			int target = hole*4 + 1;	// first child
			int second = hole*4 + 2;	// second child
			int third = hole*4 + 3;	// third child
			int last = hole*4 + 4;	// last child
			
			//set the target to be the leftmost children and compare to change the target
			if(second <= index && comparator.compare(arr[target], arr[second])>0){
				target = second;
			}
			if(third <= index && comparator.compare(arr[target], arr[third])>0){
				target = third;
			}
			if(last <= index && comparator.compare(arr[target], arr[last])>0){
				target = last;
			}
			if(comparator.compare(arr[target], value) < 0){
				arr[hole] = arr[target];
				hole = target;
			}else{	
				break;
			}
		}
		return hole;
	}