more improvements for envelopes