Change 3 to n - 1 to edit the nth column. Other minor modifications needed to edit the first or last column.
3
n - 1