update data and add a new table