nmodel with envelope