impl: DTAM (complite but not tested properly and need improvement)