flatten_xyz
