public void loadFromFiles() {
		List<String> categories = Arrays.asList("pets", "futurama", "perl", 
				"smac", "starwars", "familyguy", "humorists", "computers", "linux", "goedel",
				"art", "ascii-art", "cookie", "debian", "definitions", "drugs", "education",
				"ethnic", "firefly", "food", "fortunes", "kids", "knghtbrd", "law", "linuxcookie",
				"literature", "love", "magic", "medicine", "men-women", "miscellaneous", "news",
				"paradoxum", "people", "platitudes", "politics", "riddles", "science", "songs-poems",
				"sports", "startrek", "wisdom", "work", "zippy", "offensive", "duckdynasty", "mismanagement", "grail",
				"airplane", "caddyshack", "animal-house", "princess-bride", "godfather", "office-space",
				"stripes", "spaceballs", "blazing-saddles", "this-is-the-end", "top100",
				"naked-gun", "police-academy", "big-lebowski", "young-frankenstein", "history-of-the-world",
				"pulp-fiction", "orange-county", "shawshank", "ghostbusters", "harold-and-kumar", "strange-brew"
				);
		TreeMap<String, ArrayList<String>> fortunes = new TreeMap<String, ArrayList<String>>();
		for (String cat : categories) {
			InputStream in = getClass().getResourceAsStream("/fortunes/" + cat);
			ArrayList<String> catList = new ArrayList<String>();
			try {
				DataInputStream ds = new DataInputStream(in);
				BufferedReader br = new BufferedReader(new InputStreamReader(ds));
			  
				String strLine;
				StringBuffer buf = new StringBuffer("");
			  
				while ((strLine = br.readLine()) != null)   {
					if (strLine.equalsIgnoreCase("%")) {
						String fullFortune = buf.toString();
						catList.add(fullFortune);
						buf.setLength(0);
					} else {
						buf.append(strLine + "\n");
					}  
				}
			  
				in.close();
				fortunes.put(cat, catList);
			  
			} catch (Exception e) {
				System.err.println("Fortune Error: " + e.getMessage());
			}
		}
		
		try {
			Statement s = db.createStatement();
			for (String cat : fortunes.keySet()) {
				System.out.println("inserting");
				s.executeUpdate("insert into categories values (\"" + cat + "\")");
				System.out.println("getting id");
				ResultSet rs = s.executeQuery("select last_insert_rowid()");
				if (rs.next()) {
					System.out.println("getting long");
					long catId = rs.getLong(1);
					System.out.println(cat + " got category id " + catId);
					// insert fortunes for cat
					ArrayList<String> catFortunes = fortunes.get(cat);
					for (String f : catFortunes) {
						System.out.println("inserting fortune");
						//String safeF = f;//f.replaceAll("\"", "\\\\\"");
						String safeF = f.replaceAll("'", "''");
						//System.out.println("==[ " + safeF + " ]==");
						s.executeUpdate("insert into fortunes values ('" + safeF + "', " + catId + ")");
					}
				}
				System.out.println("going to next cat");
			}
		} catch (SQLException e) {
			System.err.println("Caught SQLException while inserting stuff");
			System.err.println(e);
		}
		
	}