added nullptr and better makefile