switch pointers to smart pointers