parse all the lines