refactored envs