protected Connection setupConnection(String hostname, int port, String database, String user, String password) {
        try {
            Class.forName("nl.cwi.monetdb.jdbc.MonetDriver");
        } catch (ClassNotFoundException e) {
            LOGGER.severe("Where is your JDBC Driver (nl.cwi.monetdb.jdbc.MonetDriver)? Include in your library path!");
            e.printStackTrace();
            return null;
        }
        
        LOGGER.fine("JDBC Driver Registered!");
	Connection connection = null;
	try {
            StringBuilder connUrl = new StringBuilder();
            connUrl.append("jdbc:monetdb://");
            connUrl.append(hostname).append(":").append(port).append("/").append(database); 
                    
            connection = DriverManager.getConnection(connUrl.toString(), user, password);
        } catch(SQLException e) {
            LOGGER.severe("Connection Failed! Check output console");
            e.printStackTrace();
            return null;
	}
	
        if(connection == null) LOGGER.severe("Failed to make connection!");
        
	return connection;
    }