nearly done, need to modify NULL for comparision with char pointer