improvements on barcode reading

new version of algorithm