now reads through file line by line