Add XYZ processing logic