first attempt at c++