envelope refactor