a code kata done in c++