should use unique_ptr for this or raw ptr?