reduce boost::shared_ptr use