nit: declare `line` locally