New func: Z(X,Y), also fix a tiny bug.