Modify for use with C++