fixed all the bugs from  when Aj changed the code.  but know it only reads the first line of data from the file