remade in c++