when doing object oriented programming (i.e. using classes and passing methods between the classes), you rarely want to have free floating classes like this here. If the method is outside of a class, it automatically gets added to the "main" object, which is the global object. This is what we would call "polluting the global namespace", and it's a nicht nicht.