Finished get_barcodes function