Added an alert at the bottom of code to check for global scope.