smart_ptr working