Update tm.cpp