private void checkForPeptides(String rnaString, String peptide, List<String> rnaStringList, boolean reverse) {
        int rnaStringLength = rnaString.length();
        int peptideLength = peptide.length();

        for (int i = 0; i < rnaStringLength - peptideLength * 3 + 1; i++) {
            String rnaSubstring = rnaString.substring(i, i + peptideLength * 3);
            String stringToCompare = proteinTranslation.translateRNAString(rnaSubstring);
            if (stringToCompare.equals(peptide)) {
                String dna = translateRNA2DNA(rnaSubstring);
                if (!reverse) {
                    rnaStringList.add(dna);
                } else {
                    reverseComplement = new ReverseComplement(dna);
                    String dnaReverseComplement = reverseComplement.getReverseComplement();
                    rnaStringList.add(dnaReverseComplement);
                }
            }
        }
    }