public static List<Category> list() throws SQLException{
		PreparedStatement s = null;
		List<Category> cats = new ArrayList<Category>();

         // Open a connection to the database using DriverManager
		try {
			try {Class.forName("org.postgresql.Driver");} catch (ClassNotFoundException ignore) {}
			currentCon = DriverManager.getConnection(
					"jdbc:postgresql://localhost/cse135?" +
				    "user=postgres&password=postgres");
			s = currentCon.prepareStatement("SELECT * FROM categories ORDER BY name ASC");
			rs = s.executeQuery();
			
			while (rs.next()) {
				Category cat = new Category();
				cat.setId(rs.getLong("id"));
				cat.setName(rs.getString("name"));
				cat.setDescription(rs.getString("description"));
				cats.add(cat);
			}
		} finally {
			if (rs != null) try {rs.close();} catch (SQLException ignore) {}
			if (s != null) try {s.close();} catch (SQLException ignore) {}
			if (currentCon != null) try {currentCon.close();} catch (SQLException ignore) {}
		}
		return cats;
	}