new package, split from xlattice_go