added TDM code