new function to use barcode as import