Added options for enveloping data and the corresponding test