Modified increment_lines and add_line