added smart pointers