switch to shared from raw ptr