add $db_name, intermediate