change id to tid