public LinkedList<Integer> searchForPattern(String pattern, String context){
		LinkedList<Integer> foundPatternList = new LinkedList<Integer>();
		int patternLength = pattern.length(); int contextLength = context.length();
		int[] prefixFunction = this.computePrefix(pattern);
		int longestPrefix = 0;
		for(int contextIndex = 0; contextIndex < contextLength; contextIndex=contextIndex+1) {
			while(longestPrefix > 0 && !this.compareTwoChars(pattern.charAt(longestPrefix), context.charAt(contextIndex)))
				longestPrefix = prefixFunction[longestPrefix-1];
			if(this.compareTwoChars(pattern.charAt(longestPrefix), context.charAt(contextIndex)))
				longestPrefix = longestPrefix + 1;
			if (longestPrefix == patternLength) { foundPatternList.add(contextIndex - patternLength+1); longestPrefix = prefixFunction[longestPrefix-1];}
			comparisons++;
		}
		return foundPatternList;
	}