necessary changes to use my smartptrs