added fallback if env var does not exist