replace futureEnv with function(){}.future()