replaced some more smart ptr