add code for barcode in main