changed "NULL" to "nullptr"