added init_env so it works with local environment.