switching over to C++ library classes
compiles
compiles but doesn't work properly yet