main, check arguments. defs, add _trace struct