internal rather than external shared_ptr for wrapper classes