Added method to set envelope