added another example C++ method