Added an (untested) a newNode function