change all raw pointer to shared_ptr