fix class func