made transformations C++ compatible