initial design all in C++