instead of new global variable, use header for api base