adding C++ wrapper (not working yet)