private void findOuterGraph(HashMap<String, String> relevantSPARQLBlocks, int varIndex){
		int charIndex = varIndex;
		int bracketIndex = 0;
		int maxBracketIndex = 0;
		while (true){
			if (charIndex==0){
				String currentLine = getCurrentLine(text, charIndex);
				if (addNewGraphBlockMapping(relevantSPARQLBlocks, varIndex, currentLine)==false){
					if (!relevantSPARQLBlocks.containsKey("DEFAULT")){
						String outerBlock = extractOuterBlock(varIndex);
						relevantSPARQLBlocks.put("DEFAULT", outerBlock);
					}
				}					
				break;
			}
			
			if (text.charAt(charIndex)=='{'){
				bracketIndex++;
				if (bracketIndex > maxBracketIndex){
					maxBracketIndex++;
					String currentLine = getCurrentLine(text, charIndex);
					if (addNewGraphBlockMapping(relevantSPARQLBlocks, varIndex, currentLine)){
						break;
					}
				}
			}
			else if (text.charAt(charIndex)=='}'){
				bracketIndex--;
			}
			
			charIndex--;		
		}
	}