problems creating own smart ptrs