update swap_lines