add tdm comparison and correct small stuff