process data line by line