Implement update_term_table function