[DEV] remove cyclic dependence on shared_ptr