Added old C++ code for historial reasons.