fixed error in class code