making dbname conditional