move that setup function up before wiping the env variables