use new C api