an implementation of update_name