read one line at a time