change metadata table and add js to add a row, intermediate