mostly c++ stuff for class