optimized item name search function