- replaced NULL with nullptr since we're all using a c++ 11 compiler now