changed 0 to nullptr