replaced last instances of NULL with nullptr