made edit function for table-string