remove duplicate code
remove setup_environ import