barcode logic