remove unnecessary std::shared_ptr usage