refactor for threading

use x_* only when there's an m_{same *} that it protects.