improve envelope for samples