Implemented Z==Y Inference