Progress on the createNode function