conversion to smart pointers