fixed for loop so new_line's line member stores the desired data from the buffer