further work on OO in cpp