private int newHole(int hole, T element){
        int left = (hole * 2) +1; //left child
        int right = (hole * 2) +2; //right child
        
        if(left > lastIndex)
            //hole has no childern
            return hole;
        else
            if(left == lastIndex)
                //left child only
                if(element.compareTo(elements.get(left))< 0)
                    //elem < left child
                    return left;
                else
                    //element >= left child
                    return hole;
            else
                //hole has 2 children
                if(elements.get(left).compareTo(elements.get(right)) < 0)
                    //left child < right child
                    if(elements.get(right).compareTo(element)<= 0)
                        //right child <= element
                        return hole;
                    else
                        //element < right child
                        return right;
                else
                    //left child >= right child
                    if(elements.get(left).compareTo(element) <=0)
                        //left child <= element
                        return hole;
                    else
                        //element < left child
                        return left;
    }