termimate when all lines are transfered