update one line at a time