define global variables outside of function scope
Merge pull request #2 from svozar/feature-global_variable_fix

define global variables outside of function scope