revived old barcode code as new didnt work