use shared_ptr for _protocol