figured out the shared_ptr usage