reduce boost::shared_ptr usage