a couple more functions in c++