item search function debugging