public static void writeFile(File filename, ArrayList lines) {
		try {
			FileWriter fw = new FileWriter(filename);
			for (int i = 0; i < lines.size(); i++)
				fw.write((String) lines.get(i) + "\n");
			fw.close();
		} catch (IOException e) {
			System.err.println("error writing file");
		}
	}