adding C++ api sketch