added check_env