Modified zfunc to PEP