public void alphabeticSortIndices(String[] words){

        // copy and pad to longest word
        String[] copy = new String[this.nWords];
        this.nLength = 0;
        int nn = 0;
        for(int i=0; i<this.nWords; i++){
            nn = words[i].length();
            if(nn>this.nLength)this.nLength = nn;
            copy[i] = words[i].toLowerCase();
        }

        // convert to character arrays
        this.wordChar = new char[this.nWords][this.nLength];
        this.holdWordChar = new char[this.nWords][this.nLength];
        for(int i=0; i<this.nWords; i++){
            char[] holdc = copy[i].toCharArray();
            for(int j=0; j<copy[i].length(); j++){
                this.wordChar[i][j] = holdc[j];
                this.holdWordChar[i][j] = holdc[j];
            }
            for(int j=copy[i].length(); j<this.nLength; j++){
                this.wordChar[i][j] = ' ';
                this.holdWordChar[i][j] = ' ';
            }
        }

        // set word order indices
        this.wordOrder = new int[this.nWords];
        this.holdWordOrder = new int[this.nWords];
        for(int i=0; i<this.nWords; i++){
            this.wordOrder[i] = i;
            this.holdWordOrder[i] = i;
        }

        // sort characters
        if(this.nWords>1)this.indexSort(0, 0, this.nWords-1);
    }