made slightly more general (always ignores first line)