final public void insertCharacter(byte characterToInsert) throws ReportedException {

        /* check if character and sequential index are valid */
        if (    (characterToInsert < lowCharacterNumber)
                || (characterToInsert > highCharacterNumber)    ) {
            reportError ("Character to insert into wavelet tree node is invalid!");
            throw new ReportedException();
        }
        if (sequentialIndex >= nodeSize) {
            reportError ("Traying to insert too many characters into wavelet tree node!");
            throw new ReportedException();
        }

        if (characterToInsert < thresholdCharacterNumber) {
            waveletNodeBitString.resetBitNoBucket(sequentialIndex++);
            if (leftChild != null) {
                leftChild.insertCharacter(characterToInsert);
            }
        } else {
            waveletNodeBitString.setBitNoBucket(sequentialIndex++);
            if (rightChild != null) {
                rightChild.insertCharacter(characterToInsert);
            }
        }
    }