menu ported to C++ code