Was trying to use shared pointers.