updated Level 2 moving global variable to be local variable

adding Level 3