updated create node to work correctly