replace xtract with dll and fixed header