initialized new nodes to have a null next