Rewrite it in CXX