added second validation method for barcode scan