fixed problem in class methods