public void readAndInitialize() throws IOException {
		HashMap<String,ArrayList<Task>> taskMap = data.getTaskMap();
		ArrayList<String> autoWords = data.getAutoWords();
		try {
			BufferedReader br = new BufferedReader(new FileReader(data.getFileName()));
			int totalLabel = Integer.parseInt(br.readLine());
			for(int i = 0; i < totalLabel; i ++) {
				String label = br.readLine();
				taskMap.put(label, new ArrayList<Task>());
				autoWords.add(label);
			}
			Collections.sort(autoWords);
			while(br.ready()) {
				String line = br.readLine();
				String[] params = line.split("\t");
				assert(params.length == 9);
				TDTDateAndTime date = new TDTDateAndTime(params[4], params[5], 
						params[6], params[7] );
				Task task = new Task(0, params[0], params[1] , date, false, false, params[8]);
				if(!taskMap.containsKey(params[0])) {
					taskMap.put(params[0], new ArrayList<Task>());
				}
				task.setTaskID(data.getLabelSize(params[0]) + 1);
				if(params[2].equals("true")) {
					task.setHighPriority(true);
				}
				if(params[3].equals("true")) {
					task.setDone(true);
				}
				if(!params[8].equals("null")) {
					task.setReminder(new TDTReminder(
							TDTTimeMethods.calculateRemainingTime(params[8]), task));
				}
				data.addTask(task);	
			}
			br.close();
		} catch(Exception e) {
			bw = new BufferedWriter(new FileWriter(data.getFileName()));
			bw.close();
		}
	}