refactor env vars