removed recursion in env_get