refactored envelope passing tests