modify the C API functions