added an ad_id variable