use shared_ptr in 3_6