public void convertCsvToClass(String path) {
	
		  File infile = new File(path);
		  File outfile = new File(infile.getParent(), "TorresAndGuerrero.dot");
		  String csvToRead = infile.getAbsolutePath();
		  BufferedReader br = null;
		  String line = "";
		  String splitBy = ",";
		  List<Tasks> taskList = new ArrayList<Tasks>();

		  try {

			  br = new BufferedReader(new FileReader(csvToRead));
			  while ((line = br.readLine()) != null) {

				  // split on comma(',')
				  String[] tasks = line.split(splitBy);
				 
				  Tasks taskObject = new Tasks();
				  taskObject.setTaskName(tasks[0]);
				  taskObject.setTaskDuration(Integer.parseInt(tasks[1]));
				  
				  for(int i=2; i<tasks.length; i++){ 
					  taskObject.getPreceedingTasks().add(tasks[i]);
				  }

				  // adding car objects to a list
				  taskList.add(taskObject);
			  	  }
				  
			  // print values stored in carList
			  printTaskList(taskList);
			  createDotFile(taskList, outfile);
		  }
		  
//		  catch (FileNotFoundException e) {
//			  e.printStackTrace();
//		  }
		  
		  catch (Exception e) {
			  System.out.println("Incorrect pert file format!");
		  }
		  
		  finally {
			  if (br != null) {
				  try {
					  br.close();
				  }
				  
				  catch (IOException e) {
					  e.printStackTrace();
					  System.out.println("Error closing parser.");
				  }
			  }
		 }
		  int noDependenciesCount = 0;
		  for (int i = 0; i < taskList.size(); i++) {
			   if (taskList.get(i).preceedingTasks.isEmpty()) {
				   noDependenciesCount++;
			   }
		  }
		  if (noDependenciesCount > 1) {
			   System.out.println("Incorrect pert file format!");
			  }
	}