adjusted listDatabases and doesDatabaseExist