porting things from dot-xt.elf back