added caching to has_ad method