add a <g> around each envelope