simplify env/ensure impl