update tg and lib