public void extractSS(ArrayList<String> dsspFile, ArrayList<Residue> resArray) {

	int resArrayCounter = 0;
	String current = "T";
	String old = "T";
	String[] sheetArray = {"E","B"};
	String[] helixArray = {"G","H","I"};
	String[] turnArray = {"","S","T"," "};
	int nis = 1; // this counter keeps track of the number of residues in a given secondary structure

	for (int i = 0; i<dsspFile.size(); ++i) {
	    try {
		String strResNum = dsspFile.get(i).substring(6,10).trim();
		Integer resNum = Integer.parseInt(strResNum); 

		if(charsAtEqual(dsspFile, i, 16, sheetArray)) {
		    resArray.get(resArrayCounter).setSSType("S");
		    //the one before was not of the same type
		    if(!current.equals("S")) {
			resArray.get(resArrayCounter).setNTerm(true);
			resArray.get(resArrayCounter - 1).setCTerm(true);
		    }
		    current = "S";
		    ++resArrayCounter;
		}
		else if(charsAtEqual(dsspFile, i, 16, helixArray)) {
		    resArray.get(resArrayCounter).setSSType("H");
		    if(!current.equals("H")) {
			resArray.get(resArrayCounter).setNTerm(true);
			resArray.get(resArrayCounter - 1).setCTerm(true);
		    }
		    current = "H";
		    ++resArrayCounter;
		}
		else if(charsAtEqual(dsspFile, i, 16, turnArray)) {
		    resArray.get(resArrayCounter).setSSType("T");
		    if(!current.equals("T")) {
			resArray.get(resArrayCounter).setNTerm(true);
			resArray.get(resArrayCounter - 1).setCTerm(true);
		    }
		    current = "T";
		    ++resArrayCounter;
		}
	    }
	    catch (Exception e) { }
	}
    }