rework + x86 impl