unpack envelope