migrate to std::shared_ptr, since we are now using c++11