adding support for z and caching envelopes