wrap the t_matrix in a def