now writes data

Data is now actually written after 2 codes have been scanned
.. i guess i should write an file explaining what this is all about