various refactorings for TC