port to subscirption using unique_ptr