refactor ChainNode