update the table snippet code