mixed barcode search with name search, refactoring