implementation of envelop