idt.c modified