refactor TB