changes toward use of unique_ptr