fixed problem with static func