public static void main(String[] args)  {
		String start, end; //Starting and ending four letter word
		Scanner scan = new Scanner(System.in);
		boolean flag = true;//boolean for User Response Menu
		
		//Import four.txt into a HashSet using newDictionary method below
		HashSet<String> dictionary = null;
		try {
			dictionary = newDictionary();
		} catch (IOException e) {
			System.out.println("Warning: There is an error importing the dictionary file");
		}
		
		//User Response Menu
		while (flag){
			String userResponse;
			
			System.out.println("What four letter word would you like to start with?");
			start = stringCheck(scan.nextLine().toLowerCase().trim(),dictionary); //Method for data integrity 
			while(start == "ERROR")
			{
				System.out.println("Please insert new starting word");
				start = stringCheck(scan.nextLine().toLowerCase().trim(),dictionary);
			}
			
			System.out.println("What four letter word would you like to end with?");
			end = stringCheck(scan.nextLine().toLowerCase().trim(), dictionary); //Method for data integrity 
			while(end =="ERROR")
			{
				System.out.println("Please insert new ending word");
				end = stringCheck(scan.nextLine().toLowerCase().trim(), dictionary);
			}
			
			final double startTime = System.currentTimeMillis();
			findChain(start,end,dictionary); //Searches for word chains
			final double duration = (System.currentTimeMillis() - startTime)/1000; //Calculate how long it took to find the word chain
			System.out.println("The search took " + duration + " seconds");
			
			//Asks user if they want to look for another word chain. If not then exit the loop.
			System.out.println("\n\nWould you like to find another? (y/n)");
			userResponse = scan.nextLine().toLowerCase().trim();
			if( userResponse.charAt(0) != 'y')
				flag = false;
		}
		scan.close();
	}