public void SourceReader(String filename)
	{
		FileReader fR;
		try
		{
			// Initialise new file reader and create and initialise buffered reader
			fR = new FileReader(filename);
			BufferedReader bR = new BufferedReader(fR);
			String readInLine;
			int lineNumber = 1;
			String indexArray[] = this.getAndSortIndexWords();
			
			try 
			{
				// keep reading in each line, assigning it to line, until equal to null 
				while((readInLine = bR.readLine()) != null)
				{
					String indexWord = "";
					// loop through index array
					for(int c = 0; c < indexArray.length; c++)
					{
						// change word every time loop through 
						indexWord = indexArray[c];
						// remove punctuation;
						readInLine = readInLine.replaceAll("[,\".;:!?()0-9]", "");
						// split the string line into and array of strings
						String wordsInLineArray[] = readInLine.split(" "); 						//loop through array of words in the line
						for(int i = 0; i < wordsInLineArray.length; i++)
						{
							// change other word every time loop through
							String lineWord = wordsInLineArray[i];
							// compare the two words together
							if ((indexWord.compareToIgnoreCase(lineWord)) == 0)
							{
								// get linked list from hashtable
								LinkedList lineNumList = concordanceHash.get(indexWord);
								
								String wordBefore = "";
								// find the word before the matched word, making sure there
								// is a word before it.
								int previousWord = i - 1;
								if(previousWord >= 0)
								{
									wordBefore = wordsInLineArray[previousWord];
								}
								
								String wordAfter = "";
								// find the word after the matched word, making sure there 
								// actually a word after it.
								int nextWord = i + 1;
								if(nextWord < wordsInLineArray.length)
								{
									wordAfter = wordsInLineArray[nextWord];
								}
								
								// create a new ContextAndLine object and add the line numbers,
								// word before and word after.
								ContextAndLine contextAndLine = new ContextAndLine(lineNumber, wordBefore, wordAfter);
								// add to the linked list.
								lineNumList.add(contextAndLine);
							}	
						}				
					}
					// increment line number
					lineNumber++;
				}
				bR.close();
			} 
			// handle IO and FileNotFound exceptions
			catch (IOException e) 
			{
				System.out.println("There was an error reading in the file");
			}	
		}
		catch (FileNotFoundException e)
		{
			System.out.println("Error, file not found");
		}
	}