How to update the rows structure of input table?