genDTER is complete
fixed errors