modified env mixin logic