moved to C++