working on C++ interface