refactor get_env_info to return dict