replaced "NULL" with "nullptr"