Use C++ API when possible