private CNode loadDialog(final String filename) {
		// TODO write better comments
		final String[] data = Utils.loadStrings(filename);

		final List<Tuple<CNode, NTuple<Integer>>> links = new LinkedList<>();

		String[] lineData;

		Integer id;
		String text;
		String response;
		Boolean ends;
		Integer[] options;
		
		CNode root = null; // top node of the conversation/dialog
		
		for(final String line : data) {
			lineData = line.split("\t");
			
			id = Utils.toInt(lineData[0], -1);
			text = lineData[1];
			response = lineData[2];
			ends = lineData[3].equals("false") ? false : true;
			options = Utils.stringsToIntegers( lineData[4].split(",") );
			
			final CNode cn = new CNode(id, text, response);
			
			cn.ends = ends;
			
			if( id == 1 ) root = cn;
			
			links.add( new Tuple<CNode, NTuple<Integer>>(cn, new NTuple<Integer>(options)) );
		}
		
		// assemble
		for(int i = 0; i < links.size(); i++) {
			final Tuple<CNode, NTuple<Integer>> t = links.get(i);
			
			final CNode node = t.one;
			final NTuple<Integer> nt = t.two;
			
			// going through the options values
			for(int n = 0; n < nt.numValues(); n++) {
				int nodeId = nt.get(n);
				
				// for each node
				for(final Tuple<CNode, NTuple<Integer>> link : links) {
					final CNode node1 = link.one;
					
					// if that node is one of the options then connect it
					if( node1.getId() == nodeId) node.addOption(node1);
				}
				
			}
		}
		
		return root;
	}