add C++ implementation