switch ofPtr -> shared_ptr