preprocess_t_dd function

Preprocess t_dd function