added test for as.tdm