switched all NULL to nullptr