Update tsm.c