added some c++ goodness