james | restoring logic to wrap_node function