added stopAds function