fixed warnings in ruby2.0 about class variable access. by using global variables!