private void createCryptolexo() {
        // use random words from the WordList if words aren't set
        if(words == null) {
            words = WordList.getWords(nwords, Math.max(N,M));
        }
        Arrays.sort(words, new CompareStringLength());
        
        int w = 0;
        while(w<nwords) {
            boolean success = false;
            int tries = 0;
            while(tries<MAX_RANDOM_TRIES) {
                tries++;
                if(addWordRandomly(words[w])) {
                    tries = MAX_RANDOM_TRIES;
                    success = true;
                    //w++;
                }
            }
            if(!success) {
                if(addWordBruteForceSequentially(words[w])) {
                    success = true;
                }
            }
            if(success) {
                includedWords.add(words[w]); 
            } else {
                removedWords.add(words[w]);                
            }
            w++;
        }
        createFilledCryptolexo();
    }