Using global keyword instead of globals()[]