Updated smartbanner function