@vecmezoni, I think it's a good idea to cache `node[i - 1]` value