fixed shared_ptr namespace
instantiate the correct class