added smart pointer class.  TODO: can combine with regular pointer class?