Initial codes. Copied from dtmMod v1.2.1
Initial codes, second time.