public static weighted readMyFile(String FileName){
			
		System.out.println("BEGIN READ FILE");
		
		weighted w = null;
		
		String record = null;
		String recordArray [] = null; 
		String linesplit = " ";

		try {
			FileReader dataSize = new FileReader(FileName);
			BufferedReader LineCounterBuffer = new BufferedReader(dataSize);
			
			w = new weighted(0);
			
			int size = -1;
			int counter = 0; 
			// Find File Size
			//int FileLength = 0;
			//while ((record = LineCounterBuffer.readLine()) != null) {
			//	FileLength++;
			//	}
			//System.out.println("File Size is: " + FileLength + " Lines Long.");

			//Using the FileLenght Create an Array to hold the subjects.
			//int objects[][] = new int[FileLength][FileLength];			

			// Read File Into Student [] Array.
			FileReader Subjectdata = new FileReader("paths.txt");
			BufferedReader SubjectReadBuffer = new BufferedReader(Subjectdata);
			record = new String();

			// File Length is looped to each array placement.
			//FileLength = 0;
			while ((record = SubjectReadBuffer.readLine()) != null) {
			
				// Read and split the lines and insert them as required
				
				
				recordArray = record.split(linesplit);
				
				//for (int i = 0; i < recordArray.length; i++){
					
					if (size == -1){
						size = Integer.parseInt(recordArray[0]);
						
						//System.out.println(recordArray[i]);
						w = new weighted(size);
					}else if (size >= 0 && counter < size){
						
						System.out.println(recordArray[0]);
						System.out.println(recordArray[1]);
						System.out.println(recordArray[2]);
						
						w.addEdge(Integer.parseInt(recordArray[0]), Integer.parseInt(recordArray[1]), Integer.parseInt(recordArray[2]), true);
						
						
						counter ++;
					}else if (counter == size){
						loadnamestxt(w,recordArray[0]);						
					}
					
				//}
				
				
				
				} 
			// After this while loop all Subjects are loaded correctly into the global method.
			LineCounterBuffer.close();
			SubjectReadBuffer.close();
			
		} catch (IOException e){
			// catch possible io errors from readLine()
			System.out.println("File not Found.");
			e.printStackTrace();
		}
		return w;
	}