Add version-checking code
hide library init in static func