implemented envelope feature and added to docs