added other C++ functions