public databaseCon() throws FileNotFoundException, IOException {
		// load data from properties file into attributes
		properties.load(new FileInputStream("config.properties"));
		this.db_username = (String) properties.getProperty("db_username");
		this.db_password = (String) properties.getProperty("db_password");
		this.db_url = (String) properties.getProperty("db_url");

		// logging stuff
		logger = Logger.getLogger(this.getClass());
		PropertyConfigurator.configure("log4j.properties");

		// Get the psql driver
		try {
			Class.forName("org.postgresql.Driver");
		} catch (ClassNotFoundException cnfe) {
			logger.warn("Driver not found!");
			cnfe.printStackTrace();
			System.exit(1);
		}

		// establish connection
		try {
			con = DriverManager.getConnection("jdbc:postgresql:" + this.db_url,
					this.db_username, this.db_password);
		} catch (SQLException e) {
			logger.warn("Connection failed!");
			e.printStackTrace();
			System.exit(1);
		}

	}