wrapped global variables/functions into anonymous functions