adapted get_uid to get_tsn