replaced raw pointers with smart pointers
indentation