private void findInput(LinkedList input) {
        String current; //current sentence        
        String currentinput; //current user input
        Collections.shuffle(databaseText);

        //iteration through the list to find all sentences with a relation to the user input
        while (!input.isEmpty()) {
            currentinput = " " + (String) input.getFirst().toString().toLowerCase() + " ";
            Iterator<String> i = databaseText.iterator();
            while (i.hasNext()) {
                current = i.next();
                if (current.toString().toLowerCase().contains(currentinput)) {  // check for matches of user input with current sentence from the database (both uncapitalized)
                    preText.add(current);
                    i.remove(); //deletion of found sentence to avoid doubling
                }
            }
            input.removeFirst();
        }
        for (Iterator<String> it = preText.iterator(); it.hasNext();) {
            String s = it.next();
        }
        if (preText.isEmpty() && !PrGenerator.mainDatabase.getUserInputFiltered().isEmpty()) {
            JOptionPane.showConfirmDialog(null, "Input wurde nicht gefunden. Es wurde ein zufälliger Text generiert", "Achtung", JOptionPane.PLAIN_MESSAGE, JOptionPane.INFORMATION_MESSAGE);// JOptionPane.WARNING_MESSAGE);
        }

    }