replaced raw pointers with shared ptrs