error is due to object slicing, add more unique_ptrs