@kizu, `nodeItem[nodeItem.length - 1]` could be renamed