took append function out of read_lines_fgets function