Add smarter tag determination