added unique_ptr support