env.withUsers refactoring