refac shared ptr