added smart pointer template class (tested but not being used yet)