Done. I made it a class variable rather than a global. I also added comments explaining it. In reality you don't really need to modify this.