adding do while loop, fgets, and malloc to read_lines